package com.david.rabbitmq.spirngboot.listener;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author David
 * @version V1.0
 * @Package com.david.rabbitmq.spirngboot.listener
 * @date 2021/7/18 10:02
 */
@Component
public class FanoutMessageListener {

    @RabbitListener(queues = "boot-q2")
    public void service(String message) {
        System.out.println("FanoutMessageListener监听到消息队列推送来的消息：" + message);
    }
}
